import java.util.*;

/**
 * @author LKQ
 * @date 2022/6/13 22:00
 * @description
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int n = sc.nextInt();
            int[][] ans = new int[n][n];
            for (int i = 0; i < n ; i++) {
                ans[0][i] = (i + 1) * (i + 2) / 2;
            }
            for (int i = 1; i < n ; i++) {
                int inc = i;
                for (int j = 0; j < n - i; j++) {
                    ans[i][j] = ans[i - 1][j] + inc;
                    inc++;
                }
            }
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < n - i; j++) {
                    if (ans[i][j] != 0 && j != n - i) {
                        System.out.print(ans[i][j] + " ");
                    }else {
                        System.out.print(ans[i][j]);
                    }
                }
                System.out.println();
            }
        }
    }
}
